﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class اتصل_بنا : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString;
        SqlConnection Conn = new SqlConnection(connectionString);
        Conn.Open();
        string Insert_str = "insert into arabic_contact (name,country,email,notes) values(@Name,@Country,@Email,@Notes)";
        SqlCommand cmd = new SqlCommand(Insert_str,Conn);
        cmd.Parameters.Add("@Name", Name.Text);
        cmd.Parameters.Add("@Country",Country.Text);
        cmd.Parameters.Add("@Email", Email.Text);
        cmd.Parameters.Add("@Notes", Notes.Text);
        cmd.ExecuteNonQuery();
        ClientScript.RegisterStartupScript(this.GetType(), "key", "alert('تم الارسال')", true);
        Conn.Close();
    }
}
